﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2.business
{
    public class DataRowFactory
    {
        public static String getRataRowToString(DataTable dt, int number = 0)
        {
            String userIDs = "";

            foreach (DataRow dr in dt.Rows)
            {
                if (userIDs.Length == 0)
                {
                    userIDs = dr[number].ToString();
                }
                else
                {
                    userIDs += "," + dr[number].ToString();
                }
            }

            return userIDs;
        }

    }
}
